<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title>Troli - travel online in Israel</title>
        <?php include_http_metas() ?>
        <?php include_metas() ?>
        <?php include_title() ?>
        <link rel="shortcut icon" href="/web/images/favicon.ico" />
        <?php include_stylesheets() ?>

        <script type="text/javascript">
            var userLang = navigator.language || navigator.userLanguage;
            var sub = "<?php echo get_slot('sub'); ?>";
            var menuCab = [];
        </script>

        <?php use_javascript('jquery-1.11.0.js') ?>
        <?php use_javascript('jquery-ui.js') ?>
        <?php use_javascript('vars.js') ?>
        <?php use_javascript('script.js') ?>
        <?php use_javascript('hotels.js') ?>
        <?php use_javascript('mainFunctions.js') ?>
        <?php use_javascript('server.js') ?>
        <?php use_javascript('private.js') ?>
        <?php include_javascripts() ?>
    </head>
    <body>
        <div id="header">
            <div class="header_container">
                <div class="header_logo">
                    <a href="<?php echo url_for('homepage') ?>"><img src="/web/images/imgLogo.png"/></a>
                </div>
                <!--                <div class="header_ads"></div>-->

                <div class="header_cab">
                    <div class="cab_container">
                        <?php
                        $user = get_slot('user');
                        if ($user == '0') {
                            echo '<ul>' .
                            '<li class="cab_welcome">Welcome Guest</li>' .
                            '<li class="cab_login"><a href="' . url_for('loginuser') . '">Login</a></li>' .
                            '<li>or</li>' .
                            '<li class="cab_sign_up">Sign up</li>' .
                            '</ul>';
                        } else {
                            echo '<ul>' .
                            '<li class="cab_welcome">Welcome <a href="' . url_for('cabinet') . '">' . $user->getFirstName() . " " . $user->getLastName() . '</a></li>' .
                            '<li class="cab_links">Balance: ' . $user->getBalance() . '$</li>' .
                            '<li class="cab_links">Orders</li>';
                            if ($user->getPermissions() == 4) {
                                echo '<li class="cab_admin"><a href="' . url_for('admin') . '">Admin Panel</a></li>';
                            }
                            
                            if ($user->getPermissions() == 2) {
                                echo '<li class="cab_admin"><a href="' . url_for('agentpage', array('agent' => $user->getId())) . '">Agent Page</a></li>';
                            }
                            
                            echo '<li class="cab_logout"><a href="' . url_for('logout') . '">Logout</a></li>' .
                            '</ul>';
                        }
                        ?>
                    </div>
                </div>
            </div>
        </div>

        <div id="menu">
            <div class="menu_separator"></div>
            <div class="menu_container">
                <div class="menu_main">
                    <ul>
                        <li><a href="<?php echo url_for('hotels', array('page' => 1, 'sort' => 'price')) ?>">Hotels</a></li>
                        <li>Apartments</li>
                        <li>Flights</li>
                        <li>Excursions</li>
                        <li>Packages</li>
                        <li>Own tour Constructor</li>
                        <li>Transfers</li>
                        <li>Car Rent</li>
                    </ul>
                </div>

                <div class="menu_language">
                    <ul>
                        <li>EN</li>
                        <li>HE</li>
                        <li>RU</li>
                    </ul>
                </div>
            </div>
        </div>

        <?php echo $sf_content; ?>

        <div id="footer">
            <div class="footer_uses"></div>
            <div class="footer_info">
                <div class="footer_info_container">
                    <div class="footer_info_develop">
                        <ul>
                            <li>Design by</li>
                            <li class="li_separator">|</li>
                            <li>Developer by</li>
                            <li class="li_separator">|</li>
                            <li>Managed by</li>
                        </ul>
                    </div>
                    <div class="footer_info_menu">
                        <ul>
                            <li><a href="<?php echo url_for('hotels', array('page' => 1, 'sort' => 'price')) ?>">Hotels</a></li>
                            <li class="li_separator">|</li>
                            <li>Apartments</li>
                            <li class="li_separator">|</li>
                            <li>Flights</li>
                            <li class="li_separator">|</li>
                            <li>Excursions</li>
                            <li class="li_separator">|</li>
                            <li>Packages</li>
                            <li class="li_separator">|</li>
                            <li>Own tour Constructor</li>
                            <li class="li_separator">|</li>
                            <li>Transfers</li>
                            <li class="li_separator">|</li>
                            <li>Car Rent</li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>

        <div class="popup_work">
            <div class="popup_reset_header">
                <div class="popup_reset_title">
                    <span>Я работаю над этим!</span>
                </div>
                <div class="popup_work_close">
                    <img src="../images/icoCancel.png"/>
                </div>
                <div class="popup_image"></div>
            </div>

            <p class="popup_result_status"></p>
            <p class="popup_result_text"></p>
        </div>

        <div class="popup_sign_up">
            <div class="popup_sign_up_header">
                <div class="popup_sign_up_title">
                    <span>Sign up</span>
                </div>
                <div class="popup_sign_up_close">
                    <img src="../images/icoCancel.png"/>
                </div>
            </div>

            <div class="field">
                <label for="sign_up_first_name">First name:</label>
                <input type="text" id="sign_up_first_name"/> 
            </div>
            <div class="field">
                <label for="sign_up_last_name">Last name:</label>
                <input type="text" id="sign_up_last_name"/> 
            </div>
            <div class="field">
                <label for="sign_up_email">E-mail:</label>
                <input type="email" id="sign_up_email"/>
            </div>
            <div class="field">
                <label for="sign_up_password">Password:</label>
                <input type="password" id="sign_up_password"/>
            </div>
            <div class="field">
                <label for="sign_up_verify_password">Verify Password:</label>
                <input type="password" id="sign_up_verify_password"/> 
            </div>
            <div class="field">
                <label for="sign_up_phone">Phone:</label>
                <input type="tel" id="sign_up_phone"/>
            </div>
            <div class="field">
                <label for="sign_up_country">Country:</label>
                <select id="sign_up_country">
                    <option value="" disabled="disabled" selected="selected">Please select a country</option>
                    <option value="1">Israel</option>
                    <option value="2">Russia</option>
                </select>
            </div>
            <div class="field">
                <input type="checkbox" id="sign_up_agent">I'm agent.
            </div>
            <div class="field">
                <input type="checkbox" id="sign_up_certificate">I head read and agree to the Troli.com Services Agreement.
            </div>

            <input type="button" id="button_sign_up_done" value="Sign up"/>
            <input type="button" id="button_sign_up_cancel" value="Cancel"/>
        </div>

        <div id="blackout"></div>
    </body>
</html>
